package com.etc.test3.dynamicproxy;

import com.etc.test3.staticproxy.AProxy;

/**
 * @author MaZheng
 * @since 2020/12/23 - 16:26
 */
public class TestMain2 {
    public static void main(String[] args) {

        AInterface target = new A();
        target.a1();


        AProxyDynamicTool tool = new AProxyDynamicTool(target);

        // 获取了反射对象
        AInterface proxytarget = tool.newInstans();

        proxytarget.a1();
        proxytarget.a2();

    }
}
